namespace FrameworkEditor
{
    public class GameBuildOperation
    {
        /// <summary>
        /// 导出到原生工程
        /// </summary>
        public const int EXPORT_PROJECT = 1;
        /// <summary>
        /// 构建游戏资源
        /// </summary>
        public const int BUILD_ASSETS = 1 << 1;
        /// <summary>
        /// 拷贝游戏资源到原生工程目录
        /// </summary>
        public const int COPY_ASSETS = 1 << 2;
        /// <summary>
        /// 构建整包
        /// </summary>
        public const int BUILD_PROJECT = 1 << 3;

        static public int BuildAll
        {
            get => EXPORT_PROJECT | BUILD_ASSETS | COPY_ASSETS | BUILD_PROJECT;
        }
        static public int GetValue(bool export = false, bool buildAssets = false, bool copyAssets = false, bool buildProject = false)
        {
            int value = 0;
            if (export)
            {
                value = value | EXPORT_PROJECT;
            }

            if (buildAssets)
            {
                value = value | BUILD_ASSETS;
            }

            if (copyAssets)
            {
                value = value | COPY_ASSETS;
            }

            if (buildProject)
            {
                value = value | BUILD_PROJECT;
            }
            return value;
        }
    }
}